#include <algorithm>
#include <iostream>
#include <map>
#include <set>
#include <vector>
using namespace std;

bool uniqueOccurence(vector<int> &arr) {
  map<int, int> recmap;
  set<int> recset;
  for (int i = 0; i < arr.size(); ++i) {
    ++recmap[arr[i]];
  }
  for (auto p = recmap.begin(); p != recmap.end(); ++p) {
    if (recset.find(p->second) == recset.end()) {
      recset.insert(p->second);
    } else {
      return false;
    }
  }
  return true;
}

int main() {
  vector<int> a = {1, 2};
  cout << uniqueOccurence(a) << endl;
}
